Called when user types within a form field.

<div class="definition">
    onInput = function(event)
</div>

This event is triggered each time user types within a form field. In the <span class="argument">event</span> object you can find
the new value of the field.

This event is usually triggered before the <a class="argument" href="w2form.onChange">onChange</a> event fires.


You can add event listener during the object creation:

<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    url      : 'server/post',
    record: {
        field_1 : 1,
        field_2 : 2
    },
    fields: [
        { field: 'field_1', type: 'text', required: true },
        { field: 'field_2', type: 'alphanumeric', required: true }
    ],
    onInput: function (event) {
        console.log(event);
    }
});
</textarea>

or any time during run-time:
<textarea class="javascript">
w2ui.form.on('input', function (event) {
    console.log(event);
});
</textarea>

The event handler is called before the default action of the event is triggered. You can cancel the default action by calling
<span class="method">event.preventDefault()</span>. To perform an action
after the event is fully processed, define <span class="method">event.onComplete</span> function.
<div style="height: 10px;"></div>
See <a href="utils/events">events</a> page in utilities for more details.